import { PlayerBase } from "../../../playerBase/PlayerBase";
import proto from "../../../proto/proto";


/**
 * 房间内玩家基类
 */
export  class RoomPlayerBase extends PlayerBase {

    private _kindId: number = 0;
    get kindId() {
        return this._kindId;
    }

    /**
     * 昵称
     */
    private _nickname: string = '';
    get nickname() {
        return this._nickname;
    }

    /**
     * 位置号
     */
    private _chair: number = 0;
    get chair() {
        return this._chair;
    }

    /**
     * 状态
     */
    private _state: proto.PlayerStateEnum = proto.PlayerStateEnum.NONE;
    get state() {
        return this._state;
    }

    /**
     * 设置昵称
     * @param nickname 玩家的昵称
     */
    setNickname(nickname: string) {
        this._nickname = nickname;
    }

    /**
     * 设置位置号
     * @param chair 玩家的位置号
     */
    setChair(chair: number) {
        this._chair = chair;
    }

    /**
     * 设置状态
     * @param state 玩家的状态
     */
    setState(state: proto.PlayerStateEnum) {
        this._state = state;
    }
}